<template>
  <div id="youngDeptList">
    <section class="wboxd">
      <el-table :data="list" highlight-current-row v-loading="listLoading" style="width: 100%;" border
        >
        <el-table-column type="index" label="序号" width="50" fixed align="center" class-name="tableth">
        </el-table-column>
        <el-table-column prop="logId" label="版本号" align="center" width="60" />
        <el-table-column prop="tableName" label="数据表" align="center" width="120" />
        <el-table-column prop="dataId" label="数据Id" align="center" width="260" />
        <el-table-column prop="tableField" label="字段" align="center" width="120" />
        <el-table-column prop="description" label="问题描述" min-width="150" />
      </el-table>
    </section>
  </div>
</template>

<script>
export default {
  data () {
    return {
      listLoading: false,
      list: [
      ]
    }
  },
  watch: {
    timestamp: {
      handler (val) {
        this.getList(this.logId)
      },
      immediate: true
    }
  },
  props: {
    logId: '',
    timestamp: ''
  },
  methods: {
    getList (id) {
      let para = {
        logId: id,
        pageNum: 1,
        pageSize: 10000,
        orderField: this.Sortkey,
        orderType: this.Isace
      }
      this.listLoading = true
      this.$http
        .post(this.$http.defaults.zbbsmzAPI + `api/busError/queryByPage`, para)
        .then(response => {
          this.listLoading = false
          if (response.data.success) {
            this.list = response.data.result.records
          } else {
            this.$message({
              message: '获取失败:' + response.data.message,
              type: 'error'
            })
          }
        })
        .catch(error => {
          this.listLoading = false
          this.$message({
            message: '网络获取失败:' + error,
            type: 'error'
          })
        })
    }
  }
}
</script>
<style>
#youngDeptList .el-drawer__wrapper{
  width: 100%;
  height: 100%;
  position: fixed !important;
  overflow: hidden;
}
  .wboxd .el-table th{
    font-weight: normal;
    background-image: linear-gradient(to bottom , #f8f8f8, #efefef);
  }
  .wboxd .el-table td, .el-table th{
    padding:0;
    font-size:var(--size14) !important;
    line-height: 20px;
    font-family: '宋体'
  }
  .tableth{
    background-image: linear-gradient(to bottom , #f8f8f8, #efefef);
    height:33px;
  }
  #testlist .wboxs{
    height:45px;
    padding-top:10px;
  }
  #youngDeptList .el-table td{
    border-right: 1px solid #95B8E7;
    border-bottom: 1px solid #95B8E7;
  }
</style>
<style scoped>
  #youngDeptList .el-button{
    color:#fff !important;
  }
  #youngDeptList h1{
    font-size:var(--size16) !important;
    font-weight: bolder;
    height: 30px;
    border-bottom: 1px solid #95B8E7;
    font-family: '宋体';
    line-height: 30px;
    color: #000;
    padding-left:10px;
    background-image: linear-gradient(to bottom , #EEF4FF, #E0ECFF);
    margin:0;
  }
  .el-pagination{
    float: left;
    padding:7px 10px;
  }
  #youngDeptList .wboxs{
    width: 100%;
    background: #fff;
    border: 1px solid #95B8E7;
    margin:0 10px;
    overflow: hidden;
    padding:0;
  }
  .wboxd{
    padding:0;
    width: calc(100% - 0px);
    background: #fff;
    border: 1px solid #95B8E7;
    margin:0 10px;
    overflow: hidden;
  }
</style>
